﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Microsoft.IT.Crm.Utility.CrmSolutionManager
{
    class EntityConstants
    {
        public const int Const_ComponentType_WebResource = 61;
        public const int Const_ComponentType_SDKMessageProcessingStep = 92;

        public const string Const_Entity_StateCode = "statecode";

        public const string Const_Solution_Entity = "solution";
        public const string Const_Solution_Entity_Id = "solutionid";
        public const string Const_Solution_Entity_UniqueName = "uniquename";
        public const string Const_Solution_Entity_FriendlyName = "friendlyname";
        public const string Const_Solution_Entity_PublisherId = "publisherid";
        public const string Const_Solution_Entity_IsManaged = "ismanaged";
        public const string Const_Solution_Entity_Version = "version";

        public const string Const_Publisher_Entity = "publisher";
        public const string Const_Publisher_Entity_Id = "publisherid";
        public const string Const_Publisher_Entity_UniqueName = "uniquename";

        public const string Const_SolutionComponent_Entity = "solutioncomponent";
        public const string Const_SolutionComponent_Entity_ObjectId = "objectid";
        public const string Const_SolutionComponent_Entity_ComponentType = "componenttype";

        public const string Const_WebResource_Entity = "webresource";
        public const string Const_WebResource_Entity_Id = "webresourceid";
        public const string Const_WebResource_Entity_WebResourceType = "webresourcetype";
        public const string Const_WebResource_Entity_Content = "content";

        public const string Const_SdkMessageProcessingStep_Entity = "sdkmessageprocessingstep";
        public const string Const_SdkMessageProcessingStep_Entity_Id = "sdkmessageprocessingstepid";
        public const string Const_SdkMessageProcessingStep_Entity_Configuration = "configuration";

        public static string[] Static_Solution_Key_Fields = new string[] { 
            EntityConstants.Const_Solution_Entity_Id, 
            EntityConstants.Const_Solution_Entity_UniqueName, 
            EntityConstants.Const_Solution_Entity_IsManaged,
            EntityConstants.Const_Solution_Entity_Version
        };

        public static string[] Static_Publisher_Key_Fields = new string[] { 
            EntityConstants.Const_Publisher_Entity_Id
        };

        public static string[] Static_WebResource_Key_Fields = new string[] { 
            EntityConstants.Const_WebResource_Entity_Id,
            EntityConstants.Const_WebResource_Entity_Content
        };

        public static string[] Static_SdkMessageProcessingStep_Key_Fields = new string[] { 
            EntityConstants.Const_SdkMessageProcessingStep_Entity_Id,
            EntityConstants.Const_SdkMessageProcessingStep_Entity_Configuration
        };
    }
}
